import config from "@/config"
import http from "@/utils/request"

export default {
    addCategory: {
        url: `${config.API_URL}/tool/template/category/add`,
        name: "新增",
        post: function (toolTemplateCategoryAddVo) {
            return http.post(this.url, toolTemplateCategoryAddVo);
        }
    },
    delCategory: {
        url: `${config.API_URL}/tool/template/category/del`,
        name: "多选级联删除",
        delete: function (categoryIdList) {
            return http.delete(this.url, categoryIdList);
        }
    },
    editCategory: {
        url: `${config.API_URL}/tool/template/category/edit`,
        name: "修改",
        put: function (toolTemplateCategoryEditVo) {
            return http.put(this.url, toolTemplateCategoryEditVo);
        }
    },
    getCategoryById: {
        url: `${config.API_URL}/tool/template/category/info`,
        name: "根据ID获取详情",
        get: function (categoryId) {
            return http.get(this.url + "/" + categoryId);
        }
    },
    pageListCategory: {
        url: `${config.API_URL}/tool/template/category/pageList`,
        name: "分页查询列表",
        get: function (toolTemplateCategoryQueryVo) {
            return http.get(this.url, toolTemplateCategoryQueryVo);
        }
    }
}
